package com.geostar.constructionland.statistics.util;

import java.util.LinkedList;

/**
 * 获取当前进程唯一的任务队列，可以用Spring 的单例bean替换
 * @Author zhu_jiacheng
 * @Date:2020/7/15 11:15
 */
public class TaskListUtil {
    private TaskListUtil() {
    }

    private static volatile LinkedList list = null;

    public static LinkedList getTaskList() {
        if (list == null) {

            synchronized (TaskListUtil.class) {
                if (list == null) {
                    list = new LinkedList();
                }
            }
        }
        return list;
    }
}
